import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import ShopMainEntry from '@/components/ShopMainEntry'
import ShopLogin from '@/views/ShopLogin'
import ShopRegist from '@/views/ShopRegist'
import ShoppingMall from "@/views/ShoppingMall"
import shoppingTrolley from "@/views/shoppingTrolley"
import ShopAdminMain from "@/views/ShopAdminMain"
import test from "@/views/test"
import UploadPictures from "@/views/UploadPictures"
import Account from "@/views/Account"
import buy from "@/views/buy"
import personalHomepage from "@/views/personalHomepage"
import singlePage from "@/views/Project/singlePage"
import collect from "@/views/Project/collect"
import HomePage from "@/views/Project/HomePage"
import allGoodsed from "@/views/Project/allGoodsed"
import AddressPage from "@/views/AddressPage"
import Comment from "@/views/Project/Comment"
import purchasedGoods from "@/views/Project/purchasedGoods"
import goodsPage from '@/views/goodsPage'
import searchgoodsPage from '@/views/searchgoodsPage'
import text1 from '@/views/text1'
import writeComment from '@/views/writeComment'
import getGoodsOrder from "@/views/Project/ProjectChildren/getGoodsOrder"
import getGoodsPay from "@/views/Project/ProjectChildren/getGoodsPay"
import getDeliverGoods from "@/views/Project/ProjectChildren/getDeliverGoods"
import getReceiveGoods from "@/views/Project/ProjectChildren/getReceiveGoods"
import getGoodsComment from "@/views/Project/ProjectChildren/getGoodsComment"


//文件上传
import FileTest from "@/views/FileTest"

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'ShoppingMall',
      component: ShoppingMall
    },
    {
      path: '/ShoppingMall',
      name: 'ShoppingMall',
      component: ShoppingMall
    },
    {
      path: '/HelloWorld',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/shopLogin',
      name: 'ShopLogin',
      component: ShopLogin
    },
    {
      path: '/shopRegist',
      name: 'ShopRegist',
      component: ShopRegist
    },
    {
      path: '/shoppingTrolley',
      name: 'shoppingTrolley',
      component: shoppingTrolley
    },
    {
      path: "/shopAdminMain",
      name: "ShopAdminMain",
      component: ShopAdminMain
    },
    {
      path: "/fileTest",
      name: "FileTest",
      component: FileTest
    },
    {
      path: '/test',
      name: 'test',
      component: test
    },
    {
      path: '/text1',
      name: 'text1',
      component: text1
    },{
      path: '/searchgoodsPage',
      name: 'searchgoodsPage',
      component: searchgoodsPage
    },
    {
      path: '/UploadPictures',
      name: 'UploadPictures',
      component: UploadPictures
    },
    {
      path: '/Account',
      name: 'Account',
      component: Account
    },
    {
      path: '/buy',
      name: 'buy',
      component: buy
    },
    {
      path: '/writeComment',
      name: 'writeComment',
      component: writeComment
    },
    {
      path: '/personalHomepage',
      name: 'personalHomepage',
      component: personalHomepage,
      children: [
        {
          path: '/personalHomepage/singlePage',  // 项目 进行中
          name: 'singlePage',
          component: singlePage    // 子路由
        },
        {
          path: '/personalHomepag/Comment',
          name: 'Comment',
          component: Comment
        },
        {
          path: '/personalHomepage/collect',  // 项目 已完成
          name: 'collect',
          component: collect ,  // 子路由
          children:[
            {
              path: '/personalHomepage/allGoodsed',  // 项目 进行中
              name: 'allGoodsed',
              component: allGoodsed    // 子路由
            },
          ]
        },
        {
          path: '/personalHomepage/HomePage',  // 项目 已完成
          name: 'HomePage',
          component: HomePage   // 子路由
        },
        {
          path: '/personalHomepage/AddressPage',
          name: 'AddressPage',
          component: AddressPage
        },{
          path: '/personalHomepage/purchasedGoods',
          name: 'purchasedGoods',
          component: purchasedGoods,
          children:[
            {
              path: '/personalHomepage/purchasedGoods/getGoodsOrder',  // 项目 进行中
              name: 'getGoodsOrder',
              component: getGoodsOrder    // 子路由
            },
            {
              path: '/personalHomepage/purchasedGoods/getGoodsPay',  // 项目 进行中
              name: 'getGoodsPay',
              component: getGoodsPay    // 子路由
            },
            {
              path: '/personalHomepage/purchasedGoods/getDeliverGoods',  // 项目 进行中
              name: 'getDeliverGoods',
              component: getDeliverGoods    // 子路由
            },
            {
              path: '/personalHomepage/purchasedGoods/getReceiveGoods',  // 项目 进行中
              name: 'getReceiveGoods',
              component: getReceiveGoods    // 子路由
            },
            {
              path: '/personalHomepage/purchasedGoods/getGoodsComment',  // 项目 进行中
              name: 'getGoodsComment',
              component: getGoodsComment    // 子路由
            },
          ]
        },
      ]
    },{
      path: '/goodsPage',
      name: 'goodsPage',
      component: goodsPage
    },
  ]
})
